slight edits to make it compile on windows