Updated function
Improved responsive design