Implemented getTotal