refactor lua.go