scala class builder