Added description of subroutine in the code, minor changes to intersectCollect