Yeah I figured that out after writing this algorithm, no problem though iy's good practice.