added the getters and setters to calculate total