code from my talk 'Erlang/OTP by Example