Fully working Nested Grouping

fixind indentation problems