Thanks, i still face a problem as i try to implement your solution with small fix but the output is wrong see this :
if you can help here this will be great
currently, if you run this program you will see that the results are connected to the string.
what i need that each element will be in its own element e.g :