changed some magic numbers