Initial attempt at implementing our model, needs testing