Leaf node functions done (untested)