added mobile Safari optimization