hashtable and queue free method