refactor for mobile