Updated for mac use