update js for adding books