change flash function