Merged generateInputLogic into generateInput