tiny code reorganization