use a variable rather than calling ifa twice