port to work in other browsers