added code for routing groups.