Added code to the flying counter example.