implement first version of virtual terminal class.