corrected version of phil50 hw1 again