fixed #2: checks for duplicate when adding books
fixed #3: only update a part of the attributes when I update a book