abstracted math evaluation out into separate module