Added cumulative_sum, is_upper and is_lower functions