adding cross browser compatibility