for 1.1 release

fixed problem with identical name of inputs
optimized code