Update to use lua closure