complete rewrite + become a rspec matcher