made changes to problem solving

made changes to problem solving