mathmanager class