Erlang code is not working. :(