clean-up, removing some redundant code
Adding problem 7