refactors based on directions
completes problem 4
completes problem 5