add some code to solve the browser compatibility