Added ptreap changes