conditionally declare constants to avoid warning
convert variables to instance variables