optimization

uses less space, bit faster, multiple key detect (even all 24 in the same time!)