fixing reduce