refactoring for mobile