New algorithm based on Differences