refactoring, new primary key feature