initial implementation for Queue and Heap