- cleaned the code in generateTuples() method
- added comments