added recursive sum