refactored AddNewObjectClass