other ways to solve this problems