Added a heap based method to stream