add reduceby
by: test more complex apply