rewrote class.