refactor nuc_id to id and add generator