Added some function to chat classes