generateId() was missing