refactored + mobile detection!