Works for libraries, but found the atomicity problem. Last version before modifying the model