still not counting totalOrdered value correctly