add each flash function