replace in place of subs, pairs tested; should replace typ.obj with newobj