making this more flexible for mac/ios