redone with key input