erlang: make the api more user-friendly