Updated script because it branched from original source