completed coding for week 7 requirements