Problem 1 improvement