mac and sigmoid code