Solved Problem 11; code needs a cleanup