add solve method