updated the methods in Input