finished tasks 5 & 6 of homework 1