adding constants to replace magic numbers.