finished task 3 of homework 1