Added function rpin.