Changed aggregate to sum