extract calc functions to a service
Merge pull request #2 from jbkly/workingbranch

extract calc functions to a service