merge algorithm for point lists