replaced magic number with define