updated the dataModel getting the length