changed mean to sum