starting code reorganization