another solution to 3