changed 001***.py to use reduce. slightly faster than for loop