Put reference code to cvtest functionality