change formatter to class