hopefully fixed some magic numbers.