calculations refactor
calculations refactor