updated thumbnail loop