small changes on mac
merged windows and mac versions