scala class example