implemented UFDS data structure