add solve button functionality