adding better function in chat

adding better functions in chat.