updated fromUnitList method to correct parse the data from database