implement addPrimaryKey
simplify newClass