replace magic numbers with constants