new small code reorganization