Rewrite class to define