use existing customer loop in API