a lua wrapper for the