Improve problem 1 some more