modify for mac environment