- added a 2nd calculate function for nested