Make listTree more flexible in the future