attempt at a generative model