added the beginnings of model code and tests