fixed formula, passes check50