solve method to include parameters