adapt macro 6 to use pre-unfolded results