Code for a model for a paper (hopefully)