Using loops instead of hard coding indeces.