Updated C base code