updating primary keys