introduce recursive solution for sum
introduce max computation (recursively)