import reduce on python 3.x