update based on class