merging in the code for manipulating GPIOs