this is about tree structure and algorithm