replace unintuitive reduce() calls with slightly less unintuitive chain() calls