Readjusted the function with a callback to conform to the node style