code reorganizing