Updated script for yosemite