Added replacement method factory.