erlang utilities