move customer id generation out of addPledge