fix on ping pong code