Created get_min_costs function, and implemented update_node not done yet though