fix input generation