updated to work with rethinkdb v1.4