Revert "Revert "Revert "changes to maths"""

This reverts commit 50962fd993ab96c5464579df165b78e06b613cf9.