changed method sum_of to private