calculations changes from 1a2c60157b6c3426d8f1d7f297455aeda26b17ee