updated for mac/linux