get units from db