improved sum_to_n?