Implemented some cfg functions