converted to instance methods in preparation for accumulator instance variable