Make example codes as complete as possible