Changed tree (using library now)

Because old is bugged (if it will get fix, then maybe it will be used
again)