updated browser detection method