added a sum counter