rewrite for win7