removed a few more magic numbers