how ipos work