Finished Reduce logic