starting json rewrite and class selection