working on heap
merge
linked multiple stacks and filtered the stack for the necessary heap objects
merge