working OOP on dapanes