implementation

implement protocal, fix the input text problem