If the libraryId is just ++, why we use the `HashMap`?