correct spelling and simplify the script