work done to add handling for recursive functional definitions