added pin direction for reset