use api to access node internals instead of struct