modify the run method on mac