Erlang Class Transformation