added pin conversions and Pin input class