use min-window, some changes to get tests running in node (but not passing)