inverse transform sampling method