rewrite in class