replacing magic ints with computations for clarity