edited advanced search and add message box