keep track of if node is a leaf