converted to use gpio abstraction.