implementing the flash messages
flash messages implemented