added parallel logic for merge sort