adds update method
adds flash messages for updates