handle multiple device support and maybe run on non-windows