public synchronized void remove(String bookId) {
    if (items.containsKey(bookId)) {
      ShoppingCartItem scitem = (ShoppingCartItem) items.get(bookId);
      scitem.decrementQuantity();

      if (scitem.getQuantity() <= 0) {
        items.remove(bookId);
      }

      numberOfItems--;
    }
  }