join function, removed aggregate
some unittests