solving mathmatic problems