adding support for different kind of inputs.