fixed generate input