calculations changes and tests