Improve problem42