added factory to resource