testing the existence of some records