added support for different browsers