implemented first half of runTrial in runme2.py