merge matthew in and out