Revert "Removed failed factory"

This reverts commit 6b8c58e4b58fc5a67c8bb0a6ba868dbfa8d3115e.
Added post upgrading