added func2 solve