modified search and added messages