Improvement of the sendPinName function