added sum reduction