core-4342 core-4446 add tree viewer logic