code reorganisation phase-I