modifying minPos to find better routes
found solution, calculating cost
added cost calculation