problem 5
commented code