reforming lua wrapping. Don't touch any lua function or wrapper!