add flash/alert functionality