Factor out magic numbers