calculation now works correctly