simple terminal emulator by erlang