Changing nested Pairs to Strings