Changed pin direction