added support for inputs