Basic tree quality measure implemented