update class from beginning to end