changed script to read