replaced method flashAlert to addFlashAlert