malloc for coordinatelist