rewrite the #rewrite and OpenTGroup method