windows port: first implementation