(it was moved here from couchexport)