add flash toggle feature