updated get_plan