Additions to planning.py