add index and odrer makeLine