added pin read / write / mode