Update to allow for nested condition groups