Moved highlight_node function