Added input recognition

not sure if works