Added fundefn function to main_bellman.py