don't you also want to check if the ArrayList is empty, and if so, remove its entry from the table?