multi input version added