IMplement cp solver