some util for lua