Solved Problem 5. Added documentation as well