update collect extract function