Updated calculate functions to be fluent and added specs