refactoring mobile rules