edit code for Mac