extracted some magic numbers into global variables