added a flash helper method