Implement reducer