This project aims to develop a pen-based software tool that will assist in the process of doing mathematics by providing structured manipulation of handwritten mathematical expressions. The tool will be used to support the teaching of the dynamics of problem solving in a way that combines the advantages of the traditional blackboard style of teaching with the flexibility and accuracy of computer software. It will provide not only a simpler way to input mathematics - by allowing the recognition of handwritten mathematics - but also enhance students’ understanding of the calculational techniques and facilitate the process of doing mathematics - by providing structure editing. Some of the most important features of this tool are the accurate selection and copy of expressions, the automatic application of algebraic rules and the use of gestures to apply them, and also the combined writing of mathematics and text. These features will have a major impact on writing, doing, and presenting mathematics. This project includes the required technical developments and also the application and testing of the tool in concrete situations, namely in mathematics and computing science courses.