add lua script abstraction part 1