changed web browser detection implementation