added sorting for books