Added first version of LB with tree, but seg fault for large sizes