add test
add write in lua