Code runs

also re-indented code in Mac OS