Replaced check with variable