Erlang utilities