Flash logic