some reorganization fixing chat