adds logic for LOOKING and FLASHING states