improved the solutions