hard problem solution.