My first foray into the wonderful world of Erlang