check presence function