merge inputs