cleaning up problem 2