Why is it necessary to translate new_pin to pin here? Can you add a more explicit comment?