Solved 50, and refactored
tart 51