Changed around the formula code a little.