FEAT: code refactoring for INPUT.