lee algorithm updated