got rid of magic numbers