match materials to reference