implement nest and unnest operators