From a random to the correct structure: the VLD algorithm