add resource factory