refactor problem 1 to a one-line