Upheaping works for the base case
Upheap working for more cases but not fully yet
Upheap seems to finally be working fine