handled gpio properly