completed rspec testing, but probably needs to be decoupled