use pullup for input to avoid noise