bugfixed with windows; added speedup