make some change to work with both window and mac