first pass refactor of recalculate