update algorithm :8ball: