corrected some mistakes and completed script