I think it did both. In parts it followed the book shot for shot and line for line but because it would have had to have about about 10 times longer to do that for the whole book, the other parts designed to knit it together didn't feel as cohesive. The movie doesn't give enough time to develop each character and especially the smaller characters and that makes it a far lesser experience in my opinion. I thought the movie was good, but parts like the changed ending and even some of the changed dialogue, Dr M not talking to Adrian at the end, really came off poorly.