tried to make the lsit_trial function more efficient. added problem 3