working on windows portability (part 1)