flash logic