removed unnecessary iteration