added the existsPrefix method