initial commit

Initial commit of the script, which was written in 2012