add parallel support to calculate time-consuming level one distance calculation