added ViewExists method