changes example code in erlang