replace magic values with constants