Adding threading for windows