tested on Cygwin