ReferenceError: collect is not defined