Add update function on books view