add a function that verify user input of node