Making changes to the random gen to remove self loops