start of consolidation script