refactor flash alert message