adding Erlang support. Still needs testing but seems to work ok.