lupton algo now working