for assignment1, q4