moving factory to ext package