adapt for IE7+