tried another way to solve