added get gpio function