add solution and vality check