Refactoring InputRule