Refactoring code, same feature