refactoring for better auto-completion in xcode