added pledge total function