corrected scripts for mac os