updated to work with older versions of IE