Handling nested cases