finished HW#3.1