updated readme and working version of the script.