Replacing magic number in code with variable