add methods to handle input