added modern browser detection