foe factory moved to scala