iterative varselrf function (with exciting parallel functionality!)