add copyPairs utility function
format and cleanup AssociativeArray
regenerate output