Remove unnecessary variable k after previous change