renamed loops to samples