fix a bug in digitalWrite.
rename methods.