removed some magic numbers