updated newPin's type signature