fixed search and added flash message and simple form