added gpio read functions