refactoring for just ios