fix bugs, and add test to lrl2