small modifications runs on mac