search and validation