Solve method added