changed double call of input to single