trying to fix equation error