Attempt 5 to fix equation