pulling out thumbnail blocks code