swap cursor arguments, new version, correct tests