Ported to windows