simplify solution 1.7