porting update list method to native cpp instead of calling bash