Pin class implementation