implemented solution saving