py3 doesn't have reduce in builtins