try to solve candy problem