Homework2 third part