composite with dynamic composites tested
swap functions accept pointer and output pointer