updated to work with other browsers