update read function for win.