made addMessageToChat more jQuery like