bug - reused variable name