changed least cost to take an abitrary cost function and changed the main call.  Still having one problm saying the edge_cost dict isnt 'callable'