nit:
var rev = results['rev']