class for managing a library