fixed some magic numbers