hopefully correct bugs in backtracking
changes to build in windows