more work on lua integration