First rewrite for class