finished add function in minheap.cpp