basic functions built, but has some minor problems with the chatClient