including modified batch3 to run on mac