more modularity in chat functionality