updated formula into one patch as upstream patch