probably final commit

Tried to get the calculation functions to work from the subclass
objects but couldn't get it to work right. So had to add some static
code to make the calculations correct.