implement xy_solver