keypad testing logic, starting prilepin's chart