added flash message support to edit view