adding solve functions