update lua client; add test cases