code reorganising