working ping pong erlang-like