Updating code for HW 7, reducible.py