update models and add rspec tests