added reduction functionality

merge me