added flash helper