reorganization and documentation