scagtree to scali-oop