eliminated a couple magic numbers