clean up, still ocasional bug
fix occasional bug
add lm test missing args
begin lr implementation