hard to solve this problem