added deallocation for Queue