add pull-up setting, correct OUTPUT to INPUT