STEP thru the program, one line at a time. It should be easy to follow what happens, rather than what you expect. Instead of doing everything first, do it all AFTER deciding the variable to use