overloaded the setpin method