Added rule factory for input commands
added rule factory for input commands