improved ghost point selection algorithm