add lua functions