modified exercise_functions.py