Building a model from scratch