moved math classes definition to cpp