complete first version of model.rb