Added comments in code on collect() method