first use of reduce pattern