added direction to NewGPIO