Another way to solve