extract factory method and push common code up to abstract adapter