move magic numbers and strings to constants