finds solution and implements