altered add_node return type to use optional