update reducer