a multiversion rethinkdb script