renamed a->total