added calls into lua for init, finalize, and is_init