Removing unnecessary variable (j,k) declaration