refactor primary key stuff