Added some real input handling