adding gpio control and some debug data