non-global functions and add node sample