added collect() and blank reduce() helper function