added backwards compatibility for older browsers