changed and commented script, and filled in README file