updated for mnist on windows, still assuming cygwin