removed unneeded functions setkeyallfalse or something like that