Responsive function for mobile phones