refactor book view