some changes to ChatServer class