It is heavily commented so that you can follow everything that goes on. After reading the documentation feel free to download the file and modify it according to your needs.
Run Download