implemented LineTree