move rethinkgo out of handlers