Reduce method completed with passing tests