sketched version comparison code