Adding positions to the Tree

I setted the positions to the trees generated by the loop function. I refactored a little bit according to what we decided