Remove redundatnt loop