refactor upgrade factory and strategy