merge with max code