update unit factory