code reorganization phase - I