addFlash method was implemented