gen now takes input