fix pointer but will check again later
Add function to get the all tree