Fixed this up to pass all rspec spec conditions