possibly better way to know when to flash the flash