change classlinklist to for loop