refactored some magic numbers into constants