Added variable k