Added  a collect function to module class