fixed q2, refactored q1 to use methods