books view refactor