made explicit factory checking