changed test code to allow composite rules
Merged code for composite rules