Changed group collision function so it uses the second parameter object