memoized ph() for performance
added cum option; added index formatting