removed magic numbers. created constants