solve button added
algorithm takes custom parameter from main