Adding fixed functional.py