improved penalty calculation