implementing search handler