added formula for localization error