solve functionality added