Treap class OOP