merge with endpoints