Added forloop to sample