loop if multiple element matches