added same loop to list gen