[modify] complete basic chat function