convert some magic numbers to variables.