get rid of some magic numbers