implement pingPong example