Code optimization?

for example, if i daisyed them up 5, 10, 50? how do i make this routine work with 5 not 3....

ok i think i worked it out myself... brb