Added test for reduce