rebuild lua class (incomplete)