refactor windows platform