modified SciPy exercises