refactored code in newChat.html