replace magic numbers with traits