change msgbox and search logic