Commit after replace conditional with Polymorphism