use scope.lookupvar in if conditions