Added main function, to call with number of destinations and return results