added more functionality to chatroom