Adding some Erlang code