added method sum