move GPIO init to the constructor