added more function and leaf nodes