Flash logic

This should probably be a function as opposed to mutable state.