Updated Erlang file

fixed errors in erlang file