implemented global key tracker