updated reducer