initial implementation of chatHandler