Added upsampling, increase speed by 7 times in long distances.