update to work in many more browsers