magic numbers are replaced by constants