fix window bug
improve speed
implement windtw and move build_window
fix warp path construction