added cross-dataset distance measure in writeprints