removing duplication of the exist? method