Problem 1 revision: 5 lines of code rewritten as 1