add support for dynamically added inputs