New Keypad function. needs to be tested