Updated compareQuantities