getting rid of some magic numbers