Added matricize and tests