update scala class and object