relocation and consolidation of functions