ReWrite using collections