check against null instead of exists
changed complexity