Using the internal pullups makes the circuit so much easier and why would there be any confusion in the code ?