Attempt 4 to fix equation