Added solution to reduce