add collector code