get input automatically