fix linear sampling pseudocode