spanIds is private value. use spanTree insted of it.