delete_all_nodes function added