Added factory function to input.