changed Percept2 to Erlang