setFlash snippet