fix parse error
format & add some tests
fix lambda closure error