added tests and extended functionality to check for correct book