solve problem 10
small cleanup