pivot to object oriented style