Homework 5 solved