rewrite meta class code