move some magic numbers into resource