added transaction support, query for new books frequency fixed