added support for IE and Safari