Added cost_function argument to the server.py total_distance function call