corrected version of phil 50 hw1