worked on problem 4 - unfinished