added gpio control