code reorganization into files