fixed the mistakes in the script