refactor for ObjectId editor