refactor caculate last id
modify name